<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
	<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
	<nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">明达课堂</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li  class="isa" ><a href="{% url 'index' %}">首页 <span class="sr-only">(current)</span></a></li>
      </ul>
          <ul class="nav navbar-nav">
        <li class="isa"><a href="{% url 'blog' %}">Blog <span class="sr-only">(current)</span></a></li>
      </ul>
          <ul class="nav navbar-nav">
        <li class="isa"><a href="{% url 'video' %}">Video <span class="sr-only">(current)</span></a></li>
      </ul>
	    {% if front_user %}
		    <ul class="nav navbar-nav navbar-right">
                <li><a href="#">{{ front_user.username }}</a></li>
            </ul>
		{% else %}
		          <ul class="nav navbar-nav navbar-right">
            <li><a href="{% url 'signin' %}">登录</a></li>
             </ul>
	        <ul class="nav navbar-nav navbar-right">
            <li><a href="{% url 'signup' %}">注册</a></li>
            </ul>
	    {% endif %} 

    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
		{% block body %}

		{% endblock %}
</body>
<script>
    const lis = document.getElementsByClassName("isa");
    for(let i=0; i < lis.length; i++ ) {
        lis[i].addEventListener('click', function (){
            for(let i=0; i < lis.length; i++ ){
                lis[i].className = "isa"
            }
            this.className = "isa active"
        })
	}
</script>
</html>